<?php

namespace Kaller\TicketsBundle\Entity;

/**
 * Kaller\TicketsBundle\Entity\Message
 *
 * @orm:Table()
 * @orm:Entity
 */
class Message
{
    /**
     * Belső azonosító
     *
     * @var integer $id
     *
     * @orm:Column(name="id", type="integer")
     * @orm:Id
     * @orm:GeneratedValue(strategy="AUTO")
     */
    private $id;

    /**
     * A küldő azonosítója
     * (ha 0, akkor ticket létrehozó)
     *
     * @var integer $user_id
     *
     * @orm:Column(name="user_id", type="integer")
     *
     * @orm:ManyToOne(targetEntity="User")
     */
    private $user_id;

    /**
     * A hozzá tartozó ticket azonosítója
     *
     * @var integer $ticket_id
     *
     * @orm:Column(name="ticket_id", type="integer")
     *
     * @orm:ManyToOne(targetEntity="Ticket")
     */
    private $ticket_id;

    /**
     * Üzenet típusa
     * (belső hozzászólás, hozzászólás)
     *
     * @var string $type
     *
     * @orm:Column(name="type", type="string")
     */
    private $type;

    /**
     * Beküldés ideje
     *
     * @var datetime $time
     *
     * @orm:Column(name="time", type="datetime")
     */
    private $time;

    /**
     * Üzenet tartalma
     *
     * @var text $content
     *
     * @orm:Column(name="content", type="text")
     */
    private $content;

    /**
     * Csatolt fájl azonosítója
     *
     * @var integer $attachment_id
     *
     * @orm:Column(name="attachment_id", type="integer")
     */
    private $attachment_id;

    /**
     * Csatolt fájl neve
     *
     * @var string $attachmentname
     *
     * @orm:Column(name="attachmentname", type="string", length=255)
     */
    private $attachment_name;


    /************************* Getters and Setters *************************/


    /**
     * Get id
     *
     * @return integer $id
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * Set user_id
     *
     * @param integer $userId
     */
    public function setUserId($userId)
    {
        $this->user_id = $userId;
    }

    /**
     * Get user_id
     *
     * @return integer $userId
     */
    public function getUserId()
    {
        return $this->user_id;
    }

    /**
     * Set ticket_id
     *
     * @param integer $ticketId
     */
    public function setTicketId($ticketId)
    {
        $this->ticket_id = $ticketId;
    }

    /**
     * Get ticket_id
     *
     * @return integer $ticketId
     */
    public function getTicketId()
    {
        return $this->ticket_id;
    }

    /**
     * Set type
     *
     * @param string $type
     */
    public function setType($type)
    {
        $this->type = $type;
    }

    /**
     * Get type
     *
     * @return string $type
     */
    public function getType()
    {
        return $this->type;
    }

    /**
     * Set time
     *
     * @param datetime $time
     */
    public function setTime($time)
    {
        $this->time = $time;
    }

    /**
     * Get time
     *
     * @return datetime $time
     */
    public function getTime()
    {
        return $this->time;
    }

    /**
     * Set content
     *
     * @param text $content
     */
    public function setContent($content)
    {
        $this->content = $content;
    }

    /**
     * Get content
     *
     * @return text $content
     */
    public function getContent()
    {
        return $this->content;
    }

    /**
     * Set attachment_id
     *
     * @param integer $attachmentId
     */
    public function setAttachmentId($attachmentId)
    {
        $this->attachment_id = $attachmentId;
    }

    /**
     * Get attachment_id
     *
     * @return integer $attachmentId
     */
    public function getAttachmentId()
    {
        return $this->attachment_id;
    }

    /**
     * Set attachment_name
     *
     * @param string $attachmentName
     */
    public function setAttachmentName($attachmentName)
    {
        $this->attachment_name = $attachmentName;
    }

    /**
     * Get attachment_name
     *
     * @return string $attachmentName
     */
    public function getAttachmentName()
    {
        return $this->attachment_name;
    }
}